//
//  U76HONet.m
//  u76ho
//
//  Created by m-air-01 on 16/1/15.
//  Copyright © 2016年 LV. All rights reserved.
//

#import "U76HONet.h"
#define URL @"http://www.u76ho.com/"
@class U76HONet;


@implementation U76HONet
//1.0
+(void)sendMessageWithAction:(NSString *)action mobile:(NSString *)mobile andDataBlock:(DictionaryBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@sendmsg.php",URL] pram:@{@"action":action,@"mobile":mobile} finished:^(id responstObj) {
        if ([action isEqualToString:@"send"]) {
            block(responstObj);
        }
        else if ([action isEqualToString:@"send2"])
        {
            int i = [[responstObj objectForKey:@"errcode"] intValue];
            if (i == 100) {
                [Singleton alerSendMessage:@"手机号未被注册"];
            }
            else
            {
                block(responstObj);
            }
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}
//1.1
+(void)messageCorrectWithaction:(NSString *)msg mobile:(NSString *)mobile code:(NSString *)code andDataBlock:(DictionaryBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@sendmsg.php",URL] pram:@{@"mobile":mobile,@"action":@"msg",@"code":code} finished:^(id responstObj) {
        int i = [[responstObj objectForKey:@"errcode"] intValue];
        if (i == 0) {
            block(responstObj);
        }
        else
        {
            NSString * errorStr = [responstObj objectForKey:@"errmsg"];
            [Singleton alerSendMessage:errorStr];
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.2
+(void)upPictureWithaction:(NSString *)action pictures:(NSArray *)picArr picname:(NSString *)picname andDataBlock:(DictionaryBlock)block
{
    UIImage * img = picArr.firstObject;

    [request() POST_URL:[NSString stringWithFormat:@"%@upfile.php",URL] updataImage:img pram:@{@"action":@"uppics",@"picname":picname} finished:^(id responstObj) {
        int i = [[responstObj objectForKey:@"errcode"] intValue];
        if (i == 0) {
            block(responstObj);
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
    
}

//1.3
+(void)getHomepageDataBlock:(HomePageModelBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@user.php",URL] pram:@{@"action":@"indexs"} finished:^(id responstObj) {
        if (responstObj) {
            int i = [[responstObj objectForKey:@"errcode"] intValue];
            if (i == 0) {
                HomePageModel * model = [[HomePageModel alloc]initDic:responstObj];
                block(model);
            }
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}


//1.4
+(void)commendActivityWithAction:(NSString *)action Infoid:(NSString *)infoid andDataBlock:(ActivityModelBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@user.php",URL] pram:@{@"action":@"article",@"infoid":infoid} finished:^(id responstObj) {
        if (responstObj) {
            int i = [[responstObj objectForKey:@"errcode"] intValue];
            if ( i == 0) {
                NSArray * arr = [responstObj objectForKey:@"errmsg"];
                NSDictionary * dic = arr.firstObject;
                ActivityModel * model = [[ActivityModel alloc]initDic:dic];
                block(model);
            }
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.5
+(void)commendCompanyListWithAction:(NSString *)action Type:(NSString *)type andDataBlock:(ArrayBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@user.php",URL] pram:@{@"action":@"tjlist",@"type":type } finished:^(id responstObj) {
        if (responstObj) {
            int i = [[responstObj objectForKey:@"errcode"] intValue];
            if ( i == 0) {
                NSArray * arr = [responstObj objectForKey:@"errmsg"];
                NSMutableArray * mArr = [[NSMutableArray alloc]init];
                for (int i = 0; i<arr.count; i++) {
                    NSDictionary * dic = arr[i];
                    CommendCompanyModel * model = [[CommendCompanyModel alloc]initDic:dic];
                    [mArr addObject:model];
                }
                block(mArr);
            }
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.6
+(void)registerUserWithaction:(NSString *)action client:(NSString *)client username:(NSString *)username userpwd:(NSString *)userpwd Mobile:(NSString *)mobile sex:(NSString *)sex andDataBlock:(DictionaryBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@user.php",URL] pram:@{@"action":@"reg",@"client":[Singleton share].cid ? [Singleton share].cid : @"" ,@"username":username ,@"userpwd":userpwd ,@"mobile":mobile,@"sex":sex} finished:^(id responstObj) {
        int i = [[responstObj objectForKey:@"errcode"] intValue];
        if (i == 0) {
            block(responstObj);
        }
        else
        {
            [Singleton alerSendMessage:@"注册失败"];
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.6.1
+(void)zhichangTrailWithAction:(NSString *)action code:(NSString *)code duty:(NSString *)duty salary:(NSString *)salary city:(NSString *)city education:(NSString *)education years:(NSString *)years address:(NSString *)address andDataBlock:(DictionaryBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@user.php",URL] pram:@{@"action":@"reg2",@"code":code,@"duty":duty,@"salary":salary,@"city":city,@"education":education,@"years":years,@"address":address} finished:^(id responstObj) {
        int i = [[responstObj objectForKey:@"errcode"] intValue];
        if ( i == 0) {
            block(responstObj);
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.7
+(void)loginWithaction:(NSString *)action Client:(NSString *)client Username:(NSString *)username Userpwd:(NSString *)userpwd withLat:(NSString *)lat withLong:(NSString *)Lng andDataBlock:(LoginModelBlock)block;
{
    [request() POST_URL:[NSString stringWithFormat:@"%@user.php",URL] pram:@{@"action":@"login" ,@"client":[Singleton share].cid ? [Singleton share].cid : @"",@"username":username,@"userpwd":userpwd,@"lat":lat,@"lng":Lng} finished:^(id responstObj) {
        
        if (responstObj) {
            NSString * token = [responstObj objectForKey:@"token"];
            NSLog(@"登录时保存的token%@",token);
            [Singleton share].token = token;
            
            [[Singleton share] saveUserInformation];
            if ([[responstObj objectForKey:@"errmsg"] isKindOfClass:[NSArray class]])
            {
                NSArray * arr = [responstObj objectForKey:@"errmsg"];
                NSDictionary * dic = arr.firstObject;
                
                //保存用户的基本信息
//                code = 222222;
//                headpic = "/Uploads/20160216/1455586475599100";
//                infos = "<null>";
//                isreal = 1;
//                mobile = 13800666666;
//                password = e10adc3949ba59abbe56e057f20f883e;
//                qycode = 111111;
//                username = dddddd;
                NSMutableDictionary * mDic = [[NSMutableDictionary alloc]init];
                [mDic setValue:[dic objectForKey:@"code"] forKey:@"code"];
                [mDic setValue:[dic objectForKey:@"headpic"] forKey:@"headpic"];
                [mDic setValue:[dic objectForKey:@"infos"] forKey:@"infos"];
                [mDic setValue:[dic objectForKey:@"isreal"] forKey:@"isreal"];
                [mDic setValue:[dic objectForKey:@"mobile"] forKey:@"mobile"];
                [mDic setValue:[dic objectForKey:@"password"] forKey:@"password"];
                [mDic setValue:[dic objectForKey:@"qycode"] forKey:@"qycode"];
                [mDic setValue:[dic objectForKey:@"username"] forKey:@"username"];
                [mDic setValue:[dic objectForKey:@"duty"] forKey:@"duty"];
                
                NSDictionary * dicnary = @{@"code":[dic objectForKey:@"code"],@"headpic":[dic objectForKey:@"headpic"],@"isreal":[dic objectForKey:@"isreal"],@"mobile":[dic objectForKey:@"mobile"],@"password":[dic objectForKey:@"password"],@"qycode":[dic objectForKey:@"qycode"],@"username":[dic objectForKey:@"username"],@"duty":[dic objectForKey:@"duty"]};
                
                [Singleton share].userInformation = dicnary;

                LoginModel * model = [[LoginModel alloc]initDic:dic];
                block(model);
            
                [[Singleton share] saveUserInformation];

                
            }
            else
            {
                [Singleton alerSendMessage:@"账户不存在或密码错误"];
            }
        }
        
        
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}
//1.7.1
+(void)refreshCidWithaction:(NSString *)action cid:(NSString *)cid code:(NSString *)code andDataBlock:(DictionaryBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@user.php",URL] pram:@{@"action":@"getcid",@"client":cid,@"code":code} finished:^(id responstObj) {
        block(responstObj);
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}
//1.8
+(void)selectedTypeReadWithtype:(NSString *)type fid:(NSString *)fid code:(NSString *)code andDataBlock:(ArrayBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@typeclass.php",URL] pram:@{@"action":@"gettype",@"type":type,@"code":code,@"fid":fid} finished:^(id responstObj) {
        if (responstObj) {
            int i = [[responstObj objectForKey:@"errcode"] intValue];
            if ( i == 0) {
                if ([[responstObj objectForKey:@"errmsg"] isKindOfClass:[NSArray class]]) {
                    NSArray * arr = [responstObj objectForKey:@"errmsg"];
                    NSMutableArray * mArr = [[NSMutableArray alloc]init];
                    for (int i = 0; i<arr.count; i++) {
                        PositionModel * model = [[PositionModel alloc]initDic:arr[i]];
                        [mArr addObject:model];
                    }
                    block(mArr);
                }
            }
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.9
+(void)setNewPasswordWithAction:(NSString *)action Username:(NSString *)username Userpwd:(NSString *)userpwd andDataBlock:(DictionaryBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@user.php",URL] pram:@{@"action":@"editpwd",@"username":username,@"userpwd":userpwd} finished:^(id responstObj) {
        int i = [[responstObj objectForKey:@"errcode"] intValue];
        if ( i == 0) {
            block(responstObj);
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.9.1
+(void)modifyPasswordWtihAction:(NSString *)action username:(NSString *)username userpwd:(NSString *)userpwd userpwd2:(NSString *)userpwd2 andDataBlock:(DictionaryBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@user.php",URL] pram:@{@"action":@"editpwd2",@"username":username,@"userpwd":userpwd,@"userpwd2":userpwd2} finished:^(id responstObj) {
        int i = [[responstObj objectForKey:@"errcode"] intValue];
        if (i == 0) {
            block(responstObj);
        }
        else
        {
            [Singleton alerSendMessage:@"修改密码失败"];
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.10
+(void)contactPeopleWithaction:(NSString *)action Code:(NSString *)code Qycode:(NSString *)qycode andDataBlock:(ArrayBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@user.php",URL] pram:@{@"action":@"friends",@"code":code,@"qycode":qycode} finished:^(id responstObj) {
        if (responstObj) {
            int i = [[responstObj objectForKey:@"errcode"] intValue];
            if ( i == 0) {
                NSArray * arr = [responstObj objectForKey:@"errmsg"];
                NSMutableArray * mArr = [[NSMutableArray alloc]init];
                for (int i = 0; i<arr.count; i++) {
                    NSDictionary * dic = arr[i];
                    ContactPeopleModel * model = [[ContactPeopleModel alloc]initDic:dic];
                    [mArr addObject:model];
                }
                block(mArr);
            }
            else
            {
                NSArray * arr = [[NSArray alloc]init];
                block(arr);
            }
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.11
+(void)mineContactPeopleWithAction:(NSString *)action code:(NSString *)code code1:(NSString *)code1 andDataBlock:(ContactPeopleDetaileModelBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@myfriend.php",URL] pram:@{@"action":@"friends",@"code":code,@"code1":code1} finished:^(id responstObj) {
        if (responstObj) {
            int i = [[responstObj objectForKey:@"errcode"] intValue];
            if ( i == 0) {
                ContactPeopleDetailModel * model = [[ContactPeopleDetailModel alloc]initDic:responstObj];
                block(model);
            }
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.12
+(void)friendImpressionWithaction:(NSString *)action code1:(NSString *)code1 andDataBlock:(DictionaryBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@myfriend.php",URL] pram:@{@"action":@"impress",@"code1":code1} finished:^(id responstObj) {
        int i = [[responstObj objectForKey:@"errcode"] intValue];
        if ( i == 0) {
            block(responstObj);
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.12.0
+(void)recommendLableWitnAction:(NSString *)action andDataBlock:(RecommenLableModelBlock)block{
    [request() POST_URL:[NSString stringWithFormat:@"%@myfriend.php",URL] pram:@{@"action":@"tagall"} finished:^(id responstObj) {
        if (responstObj) {
            int i = [[responstObj objectForKey:@"errcode"] intValue];
            if ( i == 0) {
                RecommenLableModel * model = [[RecommenLableModel alloc]initDic:responstObj];
                block(model);
            }
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.12.1
+(void)giveFriendLableWtionAction:(NSString *)action code1:(NSString *)code1 code:(NSString *)code tags:(NSString *)tags andDataBlock:(DictionaryBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@myfriend.php",URL] pram:@{@"action":@"addtag",@"code1":code1,@"code":code,@"tags":tags} finished:^(id responstObj) {
        int i = [[responstObj objectForKey:@"errcode"] intValue];
        if ( i == 0) {
            [Singleton alerSendMessage:@"评价成功"];
            block(responstObj);
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.13
+(void)commentWithAction:(NSString *)action Code:(NSString *)code andDataBlock:(ArrayBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@infos.php",URL] pram:@{@"action":@"notice",@"code":code} finished:^(id responstObj) {
        
        if (responstObj) {
            int i = [[responstObj objectForKey:@"errcode"] intValue];
            if ( i == 0) {
                if ([[responstObj objectForKey:@"errmsg"] isKindOfClass:[NSArray class]])
                {
                    NSArray * arr = [responstObj objectForKey:@"errmsg"];
                    NSMutableArray * mArr = [[NSMutableArray alloc]init];
                    for (int i = 0; i<arr.count; i++) {
                        NSDictionary * dic = arr[i];
                        AnnouncementModel * model = [[AnnouncementModel alloc]initDic:dic];
                        [mArr addObject:model];
                    }
                    block(mArr);
                }
            }
            else
            {
                NSArray * arr = [[NSArray alloc]init];
                block(arr);
            }
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.14
+(void)companyZiJianWithaction:(NSString *)action Code:(NSString *)code andDataBlock:(ArrayBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@infos.php",URL] pram:@{@"action":@"qytest",@"code":code} finished:^(id responstObj) {
        if (responstObj) {
            int i = [[responstObj objectForKey:@"errcode"] intValue];
            if ( i == 0) {
                if ([[responstObj objectForKey:@"errmsg"] isKindOfClass:[NSArray class]]) {
                    CompanySelfCheckModel * model = [[CompanySelfCheckModel alloc]initDic:responstObj];
                    block(model.dataArr);
                }
            }
            else
            {
                NSArray * arr = [[NSArray alloc]init];
                block(arr);
            }
            
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.15
+(void)submitTestAnswerWithaction:(NSString *)action Code:(NSString *)code TestId:(NSString *)testId Quests:(NSString *)quests suggest:(NSString *)suggest andDataBlock:(DictionaryBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@infos.php",URL] pram:@{@"action":@"savetest",@"code":code,@"testid":testId,@"quests":quests,@"suggest":suggest} finished:^(id responstObj) {
        int i = [[responstObj objectForKey:@"errcode"] intValue];
        if ( i == 0) {
            block(responstObj);
            [Singleton alerSendMessage:@"交卷成功"];

        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.16
+(void)nearCompanyWithaction:(NSString *)action lng:(NSString *)lng lat:(NSString *)lat Page:(NSString *)page pnum:(NSString *)pnum andDataBlock:(ArrayBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@infos.php",URL] pram:@{@"action":@"nearcomp",@"lng":lng,@"lat":lat,@"page":page,@"pnum":pnum} finished:^(id responstObj) {
        if (responstObj) {
            int i = [[responstObj objectForKey:@"errcode"] intValue];
            if ( i == 0) {
                if ([[responstObj objectForKey:@"errmsg"] isKindOfClass:[NSArray class]]) {
                    NSArray * arr = [responstObj objectForKey:@"errmsg"];
                    NSMutableArray * mArr = [[NSMutableArray alloc]init];
                    for (int i = 0; i<arr.count; i++) {
                        SCompanyModel * model = [[SCompanyModel alloc]initDic:arr[i]];
                        [mArr addObject:model];
                    }
                    block(mArr);
                }
            }
            else
            {
                NSArray * arr = [[NSArray alloc]init];
                block(arr);
            }
            
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.17
+(void)companyHomePageWithAction:(NSString *)action code:(NSString *)code ucode:(NSString *)ucode dates:(NSString *)dates andDataBlock:(CompanyDetailModelBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@infos.php",URL] pram:@{@"action":@"compindex",@"code":code,@"ucode":ucode,@"dates":dates} finished:^(id responstObj) {
        if (responstObj) {
            int i = [[responstObj objectForKey:@"errcode"] intValue];
            if ( i == 0) {
                if ([[responstObj objectForKey:@"errmsg"] isKindOfClass:[NSDictionary class]]) {
                    CompanyDetailModel * model = [[CompanyDetailModel alloc]initDic:[responstObj objectForKey:@"errmsg"]];
                    block(model);
                }
            }
            
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.18
+(void)searchResultWithaction:(NSString *)action type:(NSString *)type keyword:(NSString *)keyword industry:(NSString *)industry page:(NSString *)page pnum:(NSString *)pnum yqlh:(NSString *)yqlh near:(NSString *)near lng:(NSString *)lng lat:(NSString *)lat andDataBlock:(ArrayBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@infos.php",URL] pram:@{@"action":@"soso",@"type":type,@"keyword":keyword,@"industry":industry,@"page":page,@"pnum":pnum,@"yqlh":yqlh,@"near":near,@"lng":lng,@"lat":lat} finished:^(id responstObj) {
        if (responstObj) {
            if ([[responstObj objectForKey:@"errmsg"] isKindOfClass:[NSArray class]]) {
                if ([type isEqualToString:@"comp"]) {
                    NSArray * arr = [responstObj objectForKey:@"errmsg"];
                    NSMutableArray * mArr = [[NSMutableArray alloc]init];
                    for (int i = 0; i<arr.count; i++) {
                        SCompanyModel * model = [[SCompanyModel alloc]initDic:arr[i]];
                        [mArr addObject:model];
                    }
                    block(mArr);
                }
                else if ([type isEqualToString:@"duty"])
                {
                    NSArray * arr = [responstObj objectForKey:@"errmsg"];
                    NSMutableArray * mArr = [[NSMutableArray alloc]init];
                    for (int i = 0; i<arr.count; i++) {
                        SPositionModel * model = [[SPositionModel alloc]initDic:arr[i]];
                        [mArr addObject:model];
                    }
                    block(mArr);
                }
            }
            else
            {
                NSMutableArray * arr = [[NSMutableArray alloc]init];
                block(arr);
            }
        }
        
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.19
+(void)dutyDetailWithaction:(NSString *)action dutyId:(NSString *)dutyid andDataBlock:(ZPDetailModelBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@infos.php",URL] pram:@{@"action":@"dutys",@"dutyid":dutyid} finished:^(id responstObj) {
        if (responstObj) {
            int i = [[responstObj objectForKey:@"errcode"] intValue];
            if ( i == 0) {
                ZPDetailModel * model = [[ZPDetailModel alloc]initDic:[responstObj objectForKey:@"errmsg"]];
                block(model);
            }
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.19.1
+(void)resumeSelectedWithAction:(NSString *)action code:(NSString *)code andDataBlock:(ArrayBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@infos.php",URL] pram:@{@"action":@"selresum",@"code":[Singleton share].code} finished:^(id responstObj) {

        if (responstObj) {
            if ([[responstObj objectForKey:@"errmsg"] isKindOfClass:[NSArray class]]) {
                NSArray * arr = [responstObj objectForKey:@"errmsg"];
                NSMutableArray * mArr = [[NSMutableArray alloc]init];
                for (int i = 0; i<arr.count; i++) {
                    NSDictionary * dic = arr[i];
                    ResumeSelectedModel * model = [[ResumeSelectedModel alloc]initDic:dic];
                    [mArr addObject:model];
                }
                block(mArr);
            }
            else
            {
                //提示信息添加
                [Singleton alerSendMessage:@"木有简历"];
            }
        }
        
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.19.2
+(void)deliverResumeWithAction:(NSString *)action jid:(NSString *)jid rid:(NSString *)rid andDataBlock:(DictionaryBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@infos.php",URL] pram:@{@"action":@"appjob",@"jid":jid,@"rid":rid} finished:^(id responstObj) {
        int i = [[responstObj objectForKey:@"errcode"] intValue];
        if ( i == 0) {
            [Singleton alerSendMessage:@"投递成功"];
            block(responstObj);
        }

    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.20
+(void)infomationDetailWithAction:(NSString *)action infoid:(NSString *)infoid andDataBlock:(AllcommendModelBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@infos.php",URL] pram:@{@"action":@"tuzan",@"infoid":infoid} finished:^(id responstObj) {
        
        if (responstObj) {
            int i = [[responstObj objectForKey:@"errcode"] intValue];
            if ( i == 0) {
                AllcommendModel * model = [[AllcommendModel alloc]initDic:responstObj];
                block(model);
            }
        }
        
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.21
+(void)tuZanWitnAction:(NSString *)action code:(NSString *)code Msgid:(NSString *)msgid Opinion:(NSString *)opinion andDataBlock:(DictionaryBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@infos.php",URL] pram:@{@"action":@"updown",@"code":code,@"msgid":msgid,@"opinion":opinion} finished:^(id responstObj) {
        
//        {
//            errcode = 103;
//            errmsg = "\U6570\U636e\U91cd\U590d";
//        }
        int i = [[responstObj objectForKey:@"errcode"] intValue];
        if (i == 0) {
            block(responstObj);
        }
        else
        {
            if (i == 103) {
                [Singleton alerSendMessage:[responstObj objectForKey:@"errmsg"]];
            }
            NSLog(@"errcode 是%i",i);
        }
        
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.22
+(void)sendCommendWitnAction:(NSString *)action code:(NSString *)code Msgid:(NSString *)msgid Content:(NSString *)content andDataBlock:(DictionaryBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@infos.php",URL] pram:@{@"action":@"talks",@"code":code,@"msgid":msgid,@"content":content} finished:^(id responstObj) {
        int i = [[responstObj objectForKey:@"errcode"] intValue];
        if ( i == 0) {
            block(responstObj);

        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.23
+(void)infomationSendWithAction:(NSString *)action code:(NSString *)code Type:(NSString *)type Qycode:(NSString *)qycode Content:(NSString *)content Pic:(NSString *)pic imgsize:(NSString *)imgsize Position:(NSString *)position Isopen:(NSString *)isopen Codes:(NSString *)codes andDataBlock:(DictionaryBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@infos.php",URL] pram:@{@"action":@"publics",@"code":code,@"type":type,@"qycode":qycode,@"content":content,@"pic":pic,@"imgsize":imgsize,@"position":position,@"isopen":isopen,@"codes":codes} finished:^(id responstObj) {
        int i = [[responstObj objectForKey:@"errcode"] intValue];
        if ( i == 0) {
            block(responstObj);
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.24
+(void)readPeopleInfomationWitnActon:(NSString *)action code:(NSString *)code andDataBlock:(ReadBaseInfoModelBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@user.php",URL] pram:@{@"action":@"baseinfo",@"code":code} finished:^(id responstObj) {
        if (responstObj) {
            int i = [[responstObj objectForKey:@"errcode"] intValue];
            if ( i == 0) {
                NSDictionary * dic = [responstObj objectForKey:@"errmsg"];
                ReadBaseInfoModel * model = [[ReadBaseInfoModel alloc]initDic:dic];
                block(model);

            }
        }
        
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.25
+(void)modifyPeopleInfomationwithAction:(NSString *)action code:(NSString *)code mobile:(NSString *)mobile headpic:(NSString *)headpic username:(NSString *)username sex:(NSString *)sex idcard:(NSString *)idcard andDataBlock:(DictionaryBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@user.php",URL] pram:@{@"action":@"savebaseinfo",@"code":code,@"mobile":mobile,@"headpic":headpic,@"username":username,@"sex":sex,@"idcard":idcard} finished:^(id responstObj) {
        int i = [[responstObj objectForKey:@"errcode"] intValue];
        if ( i == 0) {
            block(responstObj);
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.26
+(void)collectionCompanyListWithaction:(NSString *)action code:(NSString *)code andDataBlock:(ArrayBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@user.php",URL] pram:@{@"action":@"mycomp",@"code":code} finished:^(id responstObj) {
        if (responstObj) {
            int i = [[responstObj objectForKey:@"errcode"] intValue];
            if ( i == 0) {
                if ([[responstObj objectForKey:@"errmsg"] isKindOfClass:[NSArray class]]) {
                    NSArray * arr = [responstObj objectForKey:@"errmsg"];
                    NSMutableArray * mArr = [[NSMutableArray alloc]init];
                    for (int i = 0; i<arr.count; i++) {
                        NSDictionary * dic = arr[i];
                        MyCollectionListModel * model = [[MyCollectionListModel alloc]initDic:dic];
                        [mArr addObject:model];
                    }
                    block(mArr);
                    
                }
            }
            else
            {
                NSArray * arr = [[NSArray alloc]init];
                block(arr);
            }
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.26.1
+(void)addCollectionOrfriendsWithAction:(NSString *)action code:(NSString *)code code1:(NSString *)code1 andDataBlock:(DictionaryBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@myfriend.php",URL] pram:@{@"action":@"addfriend",@"code":code,@"code1":code1} finished:^(id responstObj) {
        int i = [[responstObj objectForKey:@"errcode"] intValue];
        if ( i == 0) {
            block(responstObj);
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.26.2
+(void)delCollectionOrfrienWithAction:(NSString *)action code:(NSString *)code code1:(NSString *)code1 andDataBlock:(DictionaryBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@myfriend.php",URL] pram:@{@"action":@"delfriend",@"code":code,@"code1":code1} finished:^(id responstObj) {
        int i = [[responstObj objectForKey:@"errcode"] intValue];
        if (i == 0) {
            block(responstObj);
        }
        else
        {
            [Singleton alerSendMessage:@"删除失败"];
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}
//1.27
+(void)zhichangExprienceWithaction:(NSString *)action code:(NSString *)code andDataBlock:(ArrayBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@user.php",URL] pram:@{@"action":@"mycaree",@"code":code} finished:^(id responstObj) {
        if (responstObj) {
            int i = [[responstObj objectForKey:@"errcode"] intValue];
            if ( i == 0) {
                if ([[responstObj objectForKey:@"errmsg"] isKindOfClass:[NSArray class]]) {
                    NSArray * arr = [responstObj objectForKey:@"errmsg"];
                    NSMutableArray * mArr = [[NSMutableArray alloc]init];
                    for ( int i = 0; i<arr.count; i++) {
                        NSDictionary * dic = arr[i];
                        PastExperienceModel * model = [[PastExperienceModel alloc]initDic:dic];
                        [mArr addObject:model];
                    }
                    block(mArr);
                    
                }
            }
            else
            {
                NSArray * arr = [[NSArray alloc]init];
                block(arr);
            }
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.28
+(void)zhichangDynationWithaction:(NSString *)action code:(NSString *)code qycode:(NSString *)yqcode page:(NSString *)page pnum:(NSString *)pnum date:(NSString *)date andDataBlock:(DynaModelBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@user.php",URL] pram:@{@"action":@"mydyna",@"code":code,@"qycode":yqcode,@"dates":date,@"page":page,@"pnum":pnum} finished:^(id responstObj) {
        if (responstObj) {
            int i = [[responstObj objectForKey:@"errcode"] intValue];
            if ( i == 0) {
                DynaModel * model = [[DynaModel alloc]initDic:responstObj];
                block(model);
            }
            else
            {
//                NSDictionary * dic = @{@"errcode":@"0",@"errmsg":@[],@"istest":@"is"};
                DynaModel * model = [[DynaModel alloc]init];
                NSArray * arr = [[NSArray alloc]init];
                model.dynaArr = arr;
                block(model);
            }
        }
    } failed:^(NSString *errorMsg) {
        
        
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.29
+(void)minePictureWithaction:(NSString *)action code:(NSString *)code andDataBlock:(ArrayBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@user.php",URL] pram:@{@"action":@"mypics",@"code":code} finished:^(id responstObj) {
        if (responstObj) {
            int i = [[responstObj objectForKey:@"errcode"] intValue];
            if ( i == 0) {
                if ([[responstObj objectForKey:@"errmsg"] isKindOfClass:[NSArray class]]) {
                    NSArray * arr = [responstObj objectForKey:@"errmsg"];
                    NSMutableArray * mArr = [[NSMutableArray alloc]init];
                    for (int i = 0; i<arr.count; i++) {
                        NSDictionary * dic = arr[i];
                        PictureModel * model = [[PictureModel alloc]initDic:dic];
                        [mArr addObject:model];
                    }
                    block(mArr);
                }
            }
            else
            {
                NSArray * arr = [[NSArray alloc]init];
                block(arr);
            }
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.30
+(void)createAlumWithaction:(NSString *)action code:(NSString *)code name:(NSString *)name andDataBlock:(DictionaryBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@user.php",URL] pram:@{@"action":@"addpics",@"code":code,@"name":name} finished:^(id responstObj) {
        int i = [[responstObj objectForKey:@"errcode"] intValue];
        if ( i == 0) {
            block(responstObj);
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.30.1
+(void)modifyAlumWitnAction:(NSString *)action code:(NSString *)code type:(NSString *)type pid:(NSString *)pid name:(NSString *)name andDataBlock:(DictionaryBlock)blcok
{
    [request() POST_URL:[NSString stringWithFormat:@"%@user.php",URL] pram:@{@"action":@"editpics",@"code":code,@"type":type,@"pid":pid,@"name":name} finished:^(id responstObj) {
        int i = [[responstObj objectForKey:@"errcode"] intValue];
        if ( i == 0) {
            blcok(responstObj);
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);

    }];
}

//1.30.2
+(void)modifyPicsWithAction:(NSString *)action code:(NSString *)code pid:(NSString *)pid pname:(NSString *)pname andDataBlock:(DictionaryBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@user.php",URL] pram:@{@"action":@"delpics",@"code":code,@"pid":pid,@"pname":pname} finished:^(id responstObj) {
        int i = [[responstObj objectForKey:@"errcode"] intValue];
        if ( i == 0) {
            block(responstObj);
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}
//1.31
+(void)alumContentWithaction:(NSString *)action code:(NSString *)code picsid:(NSString *)picsid date:(NSString *)date andDataBlock:(ArrayBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@user.php",URL] pram:@{@"action":@"mypic",@"code":code,@"picsid":picsid,@"dates":date} finished:^(id responstObj) {
        if (responstObj) {
            int i = [[responstObj objectForKey:@"errcode"] intValue];
            if ( i == 0) {
                if ([[responstObj objectForKey:@"errmsg"] isKindOfClass:[NSArray class]]) {
                    NSArray * arr = [responstObj objectForKey:@"errmsg"];
                    NSMutableArray * mArr = [[NSMutableArray alloc]init];
                    for (int i = 0; i<arr.count; i++) {
                        NSDictionary * dic = arr[i];
                        PictureContentModel * model = [[PictureContentModel alloc]initDic:dic];
                        [mArr addObject:model];
                    }
                    block(mArr);
                }
            }
            else
            {
                NSArray * arr = [[NSArray alloc]init];
                block(arr);
            }
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.32
+(void)friendImpressionSecWithacton:(NSString *)action code:(NSString *)code andDataBlock:(ArrayBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@user.php",URL]  pram:@{@"action":@"mytag",@"code":code} finished:^(id responstObj) {
        if (responstObj) {
            int i = [[responstObj objectForKey:@"errcode"] intValue];
            if ( i == 0) {
                if ([[responstObj objectForKey:@"errmsg"] isKindOfClass:[NSArray class]]) {
                    NSArray * arr = [responstObj objectForKey:@"errmsg"];
                    NSArray * arr2 = [arr objectAtIndex:1];
                    NSMutableArray * mArr = [[NSMutableArray alloc]init];
                    for (int i = 0; i<arr2.count; i++) {
                        NSDictionary * dic = arr2[i];
                        FirendImpretionModel * model = [[FirendImpretionModel alloc]initDic:dic];
                        [mArr addObject:model];
                    }
                    block(mArr);
                }
            }
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.33
+(void)zhanneiLetterListWithaction:(NSString *)action code:(NSString *)code andDataBlock:(ArrayBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@user.php",URL] pram:@{@"action":@"msglist",@"code":code} finished:^(id responstObj) {
        if (responstObj) {
            int i = [[responstObj objectForKey:@"errcode"] intValue];
            if ( i == 0) {
                NSArray * arr = [responstObj objectForKey:@"errmsg"];
                NSMutableArray * mArr = [[NSMutableArray alloc]init];
                for (int i = 0; i<arr.count; i++) {
                    NSDictionary * dic = arr[i];
                    ZNletterModel * model = [[ZNletterModel alloc]initDic:dic];
                    [mArr addObject:model];
                }
                block(mArr);
            }
            else
            {
                NSArray * arr = [[NSArray alloc]init];
                block(arr);
            }
            
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.34
+(void)zhiweiListWithAction:(NSString *)action andDataBlock:(ComplexPositionModelBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@infos.php",URL] pram:@{@"action":@"zhiwei"} finished:^(id responstObj) {
        if (responstObj) {
            int i = [[responstObj objectForKey:@"errcode"] intValue];
            if ( i == 0) {
                ComplexPositionModel * model = [[ComplexPositionModel alloc]initDic:responstObj];
                block(model);
            }
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.35
+(void)zhanneiDetailWithaction:(NSString *)action idm:(NSString *)idm andDataBlock:(ZNLetterDetailModelBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@user.php",URL] pram:@{@"action":@"msgdetail",@"id":idm} finished:^(id responstObj) {
        
        if (responstObj) {
            int i = [[responstObj objectForKey:@"errcode"] intValue];
            if ( i == 0) {
                NSArray * arr = [responstObj objectForKey:@"errmsg"];
                NSDictionary * dic = arr.firstObject;
                ZNLetterDetailModel * model = [[ZNLetterDetailModel alloc]initDic:dic];
                block(model);
            }
        }
        
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.36
+(void)feedBackListWithAction:(NSString *)action code:(NSString *)code andDataBlock:(ArrayBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@user.php",URL] pram:@{@"action":@"jobback",@"code":code} finished:^(id responstObj) {
        if (responstObj) {
            int i = [[responstObj objectForKey:@"errcode"] intValue];
            if ( i == 0) {
                if ([[responstObj objectForKey:@"errmsg"] isKindOfClass:[NSArray class]]) {
                    NSArray * arr = [responstObj objectForKey:@"errmsg"];
                    NSMutableArray * mArr = [[NSMutableArray alloc]init];
                    for (int i = 0; i<arr.count; i++) {
                        NSDictionary * dic = arr[i];
                        PositionDeliverListModel * model = [[PositionDeliverListModel alloc]initDic:dic];
                        [mArr addObject:model];
                    }
                    block(mArr);
                }
            }
            else
            {
                NSArray * arr = [[NSArray alloc]init];
                block(arr);
            }
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.37
+(void)feedBackDetailWithActon:(NSString *)action idm:(NSString *)idm andDateBlcok:(PositionDeliverDetailModelBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@user.php",URL] pram:@{@"action":@"jobdetail",@"id":idm} finished:^(id responstObj) {
        if (responstObj) {
            int i = [[responstObj objectForKey:@"errcode"] intValue];
            if ( i == 0) {
                if ([[responstObj objectForKey:@"errmsg"] isKindOfClass:[NSArray class]]) {
                    NSArray * arr = [responstObj objectForKey:@"errmsg"];
                    NSDictionary * dic = arr.firstObject;
                    PositionDeliverDetailModel * model = [[PositionDeliverDetailModel alloc]initDic:dic];
                    block(model);
                }
            }
        }
        
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.38
+(void)adviceFeedBackWithAction:(NSString *)action code:(NSString *)code content:(NSString *)content andDataBlock:(DictionaryBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@myfriend.php",URL] pram:@{@"action":@"advice",@"code":code,@"content":content} finished:^(id responstObj) {
        if (responstObj) {
            int i = [[responstObj objectForKey:@"errcode"] intValue];
            if ( i == 0) {
                block(responstObj);
            }
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.39
+(void)aboutUsWithAction:(NSString *)action andDataBlock:(DictionaryBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@myfriend.php",URL] pram:@{@"action":@"aboutus"} finished:^(id responstObj) {
        int i = [[responstObj objectForKey:@"errcode"] intValue];
        if ( i == 0) {
            block(responstObj);
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.40
+(void)resumeHomepageWithAction:(NSString *)action code:(NSString *)code andDataBlock:(ArrayBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@myfriend.php",URL] pram:@{@"action":@"resum",@"code":code} finished:^(id responstObj) {
        if (responstObj) {
            if ([[responstObj objectForKey:@"errmsg"] isKindOfClass:[NSArray class]]) {
                NSArray * arr = [responstObj objectForKey:@"errmsg"];
                if (arr.count!=0) {
                    NSMutableArray * mArr = [[NSMutableArray alloc]init];
                    for (int i = 0; i<arr.count; i++) {
                        NSDictionary * dic = arr[i];
                        RusumeHomePageOneModel * model = [[RusumeHomePageOneModel alloc]initDic:dic];
                        [mArr addObject:model];
                    }
                    block(mArr);
                    
                }

            }
            else
            {
                NSArray * arr = [[NSArray alloc]init];
                block(arr);
            }
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.41
+(void)resumeIsdoWithAction:(NSString *)action code:(NSString *)code type:(NSString *)type rid:(NSString *)rid andDataBlcok:(DictionaryBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@myfriend.php",URL] pram:@{@"action":@"resumone",@"code":code,@"type":type,@"rid":rid} finished:^(id responstObj) {
        if (responstObj) {
            int i = [[responstObj objectForKey:@"errcode"] intValue];
            if ( i == 0) {
                if ([type isEqualToString:@"fresh"]) {
                    [Singleton alerSendMessage:@"刷新成功"];
                }
                else if ([type isEqualToString:@"del"])
                {
                    [Singleton alerSendMessage:@"删除成功"];
                }
                else
                {
                    
                }
                block(responstObj);
            }
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.42
+(void)editResumeWithAction:(NSString *)action code:(NSString *)code rid:(NSString *)rid andDataBlock:(EditResumeModelBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@myfriend.php",URL] pram:@{@"action":@"editresum",@"code":code,@"rid":rid} finished:^(id responstObj) {
        
        if (responstObj) {
            int i = [[responstObj objectForKey:@"errcode"] intValue];
            if ( i == 0) {
                NSArray * arr = [[responstObj objectForKey:@"errmsg"] objectForKey:@"a"];
                NSDictionary * dic = arr.firstObject;
                EditResumeModel * model = [[EditResumeModel alloc]initDic:dic];
                block(model);
            }
        }
        
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.43
+(void)modifyRusumeWithAction:(NSString *)action model:(ResumeAddModel *)model andDataBlock:(DictionaryBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@myfriend.php",URL] pram:@{@"action":@"saveeditr",@"code":model.code,@"rid":model.rid,@"title":model.title,@"workyear":model.workyear,@"birthday":model.birthday,@"nowaddr":model.nowaddr,@"workcity":model.workcity,@"homeaddr":model.homeaddr,@"dutyid":model.dutyid,@"salary":model.salary,@"intro":model.intro,@"ispic":model.ispic,@"mypics":model.mypics,@"realname":model.realname,@"sex":model.sex,@"tel":model.tel} finished:^(id responstObj) {
        int i = [[responstObj objectForKey:@"errcode"] intValue];
        if ( i == 0) {
            block(responstObj);
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.44
+(void)resumeAddWithAction:(NSString *)action model:(ResumeAddModel *)model andDataBlock:(DictionaryBlock)block
{
  
    [request() POST_URL:[NSString stringWithFormat:@"%@myfriend.php",URL] pram:@{@"action":@"addresum",@"code":model.code,@"title":model.title,@"workyear":model.workyear,@"birthday":model.birthday,@"nowaddr":model.nowaddr,@"workcity":model.workcity,@"homeaddr":model.homeaddr,@"dutyid":model.dutyid,@"salary":model.salary,@"intro":model.intro,@"realname":model.realname,@"tel":model.tel,@"sex":model.sex,@"mypics":model.mypics,@"ispic":model.ispic} finished:^(id responstObj) {
        int i = [[responstObj objectForKey:@"errcode"] intValue];
        if ( i == 0) {
            block(responstObj);
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.45
+(void)resumePreviewWithAction:(NSString *)action code:(NSString *)code rid:(NSString *)rid andDataBlock:(DictionaryBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@myfriend.php",URL] pram:@{@"action":@"readresum",@"code":code,@"rid":rid} finished:^(id responstObj) {
        int i = [[responstObj objectForKey:@"errcode"] intValue];
        if ( i == 0) {
            block(responstObj);
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.46
+(void)realNameCertificationWithAction:(NSString *)action code:(NSString *)code realName:(NSString *)realName idcard:(NSString *)idcard andDataBlock:(DictionaryBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@myfriend.php",URL] pram:@{@"action":@"idcard",@"code":code,@"realname":realName,@"idcard":idcard} finished:^(id responstObj) {
        int i = [[responstObj objectForKey:@"errcode"] intValue];
        if (i == 0) {
            [Singleton alerSendMessage:@"认证完成"];
            block(responstObj);
        }
        else
        {
            [Singleton alerSendMessage:[responstObj objectForKey:@"errmsg"]];
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.47
+(void)getVersionandDataBlock:(DictionaryBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@myfriend.php",URL] pram:@{@"action":@"getversion"} finished:^(id responstObj) {
        block(responstObj);
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}

//1.48
+(void)isAllowPushNoticationAction:(NSString *)action code:(NSString *)code isSend:(NSString *)issend andDataBlock:(DictionaryBlock)block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@myfriend.php",URL] pram:@{@"action":@"tuisong",@"code":code,@"issend":issend} finished:^(id responstObj) {
        int i = [[responstObj objectForKey:@"errcode"] intValue];
        if (i == 0) {
            block(responstObj);
        }
        else
        {
            [Singleton alerSendMessage:[responstObj objectForKey:@"errmsg"]];
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}


//1.50
+(void)CompanyZhaoPinAction:(NSString *)action code:(NSString *)code ucode:(NSString *)ucode withPage:(NSString *)page withPnum:(NSString *)pnum andDataBlock:(void (^) (id obj))block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@infos.php",URL] pram:@{@"action":@"compindex3",@"code":code,@"ucode":ucode,@"page":page,@"pnum":pnum} finished:^(id responstObj) {
        
        
        int i = [[responstObj objectForKey:@"errcode"] intValue];
        
        
        if (i == 0) {
            
            NSArray * ErrmsgArray = [responstObj objectForKey:@"errmsg"];
            
            if ([[responstObj objectForKey:@"errmsg"] isKindOfClass:[NSArray class]]) {
                
            
            NSMutableArray * mArr = [[NSMutableArray alloc]init];
                for (int i = 0; i<ErrmsgArray.count; i++) {
                    NSDictionary * dic = ErrmsgArray[i];
                    CompanyZhaoPinModel * model = [CompanyZhaoPinModel applicationWithDic:dic];
                    [mArr addObject:model];
                }
                
                block(mArr);
                
            }

            
            
            
            
            
            
        }
        else
        {
            [Singleton alerSendMessage:[responstObj objectForKey:@"errmsg"]];
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}


//1.51
+(void)CompanyChengZhangAction:(NSString *)action code:(NSString *)code ucode:(NSString *)ucode withPage:(NSString *)page withPnum:(NSString *)pnum withDates:(NSString *)date andDataBlock:(void (^) (id obj))block
{
    [request() POST_URL:[NSString stringWithFormat:@"%@infos.php",URL] pram:@{@"action":@"compindex2",@"code":code,@"ucode":ucode,@"page":page,@"pnum":pnum,@"dates":date} finished:^(id responstObj) {
        
        
        if (responstObj) {
            int i = [[responstObj objectForKey:@"errcode"] intValue];
            if ( i == 0) {
                if ([[responstObj objectForKey:@"errmsg"] isKindOfClass:[NSDictionary class]]) {
                    CompanyDetailModel * model = [[CompanyDetailModel alloc]initDic:[responstObj objectForKey:@"errmsg"]];
                    block(model);
                }else{
                
                    block(responstObj);
                
                }
            }
            
        
            
            
        }
        else
        {
            [Singleton alerSendMessage:[responstObj objectForKey:@"errmsg"]];
        }
    } failed:^(NSString *errorMsg) {
        NSLog(@"***errorMessage:%@",errorMsg);
    }];
}



@end
